
console.log("begin test");

var Func = function(name){
    console.log("init Func");
    this.n = name;
}
Func.prototype.Test1 = function(){
    var that = this;
    console.log("in Test1");
    console.log(that.n);
    (function(){
        console.log("int time out")
        console.log(that.n); // first
        console.log(this.n); // undefine
        // 此时this是此函数对象了
    }());
}
var func1 = new Func("first");
func1.Test1();


